<#include "/macro.include"/>
<#include "/java_copyright.include">
<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
package ${basepackage}.${namespace}.entity;
/**
 * ${table.tableAlias}
 * @author 陶富  2018-11
 *
 */
public class ${className}Model implements java.io.Serializable{

	//------------fields START-------------
	
	<#list table.columns as column>
	<#if column.getJavaType() = "Date">
	public long ${column.columnNameLower};	//${column.columnAlias}
	public String ${column.columnNameLower}String;	//${column.columnAlias}字符串 格式为yyyy-MM-dd HH:mm:ss
	<#elseif column.getJavaType() = "Long" || column.getJavaType() = "java.lang.Long">
	public long ${column.columnNameLower};	//${column.columnAlias}
	<#elseif column.getJavaType() = "Double">
	public double ${column.columnNameLower};	//${column.columnAlias}
	<#elseif column.getJavaType() = "Integer">
	public int ${column.columnNameLower};	//${column.columnAlias}
	<#else>
	public ${column.getJavaType()} ${column.columnNameLower};	//${column.columnAlias}
	</#if>
	</#list>
	
	//------------fields END-------------

	@Override
	public String toString() {
		return "${className}Model{" +
		<#list table.columns as column>
			<#if column_index == 0 >
			" ${column.columnNameLower}='"+${column.columnNameLower}+'\''+
			<#else>
			<#if column.getJavaType() = "Date">
			", ${column.columnNameLower}String='"+${column.columnNameLower}String+'\''+
			", ${column.columnNameLower}='"+${column.columnNameLower}+'\''+
			<#else>
			", ${column.columnNameLower}='"+${column.columnNameLower}+'\''+
			</#if>
			</#if>
		</#list>
			'}';
	}
}	
